<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1 {
            width: 100px;
            height: 100px;
            border: 1px solid;
            font-size: 40px;
            /* 顶部外边距 */
            /* margin-top: 40px; */
            /* 左侧外边距 */
            /* margin-left: 40px; */
            /* 简写格式 */
            /* margin: 40px; */
            /* 让一个块级元素在水平方向居中 */
            /* margin: 0 auto; */
            /* margin-bottom: 40px; */
            display: inline-block;
            margin-right: 40px;
        }

        .div2 {
            width: 100px;
            height: 100px;
            border: 1px solid;
            font-size: 40px;
            /* margin-top: 40px; */
            display: inline-block;
            margin-left: 40px;
        }
    </style>
</head>

<body>
    <div class="div1">div1</div>
    <div class="div2">div2</div>
</body>

</html>